"""
应付款修改编辑页面
"""

from page.base_page import BasePage
from selenium.webdriver.common.by import By

class XgYfkPage(BasePage):
    url = "http://192.168.1.25/crm/index.php?m=finance&a=edit&t=payables&id=7"
    #定位器
    xg_yfkm_locator = (By.NAME, 'name')
    xg_bc_btn_locator = (By.NAME, 'submit')
    xg_qx_btn_locator = (By.CSS_SELECTOR,'body > div.container > div.row > div > form > table > tfoot > tr > td:nth-child(2) > input:nth-child(2)')
    table_locator = (By.CSS_SELECTOR, '#form1 > table > tbody')
    #操作方法
    def input_yfkm(self,yfkm):
        self.driver.find_element(*self.xg_yfkm_locator).clear()
        self.driver.find_element(*self.xg_yfkm_locator).send_keys(yfkm)
    def click_xg_bc_btn(self):
        self.driver.find_element(*self.xg_bc_btn_locator).click()

    def click_xg_qx_btn(self):
        self.driver.find_element(*self.xg_qx_btn_locator).click()

    # #获取表格
    # def get_table_element(self):
    #     return self.driver.find_element(*self.table_locator)